package com.weipai.springboot.module.dao.impl;

import com.weipai.springboot.model.DemandCategory;
import com.weipai.springboot.module.dao.DemandCategoryDao;
import com.weipai.springboot.module.mapper.DemandCategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 曹朋飞
 * @Date: 2018/09/12 10:47
 */
@Repository
public class DemandCategoryDaoImpl implements DemandCategoryDao{
    
    @Autowired
    DemandCategoryMapper demandCategoryMapper;
    
    @Override
    public int insert(DemandCategory demandCategory) {
        return demandCategoryMapper.insert(demandCategory);
    }

    @Override
    public int updateByPrimaryKey(DemandCategory demandCategory) {
        return demandCategoryMapper.updateByPrimaryKeySelective(demandCategory);
    }

    @Override
    public DemandCategory getDemandCategoryById(String demandCategoryId) {
        return demandCategoryMapper.getDemandCategoryById(demandCategoryId);
    }

    @Override
    public int batchDeleteById(String[] id) {
        return demandCategoryMapper.batchDeleteById(id);
    }

    @Override
    public List<DemandCategory> selectAllByDemandCategoryDel(int demandCategoryDel, String search, String sort, String way) {
        return demandCategoryMapper.selectAllByDemandCategoryDel(demandCategoryDel, search, sort, way);
    }

    @Override
    public int updateStatus(String demandCategoryId, Integer status) {
        return demandCategoryMapper.updateStatus(demandCategoryId, status);
    }
}
